﻿<!doctype html>
<html lang="zh">
<head>
	<meta charset="UTF-8" />
	<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
	<meta name="viewport" content="width=device-width, initial-scale=1.0" />
	<script type="text/javascript" src="../wap/js/jquery.min.js"></script>
	<script type="text/javascript" src="../wap/center/cfg.js"></script>
	<script type="text/javascript" src="../wap/js/download-app.js"></script>
	<title>互联网影像数据中心</title>
	<style type="text/css">
		*{ padding:0; margin:0;}
		html{ height:100%;}
		body{ width:100%; height:100%;background-color: #fff}

		.title {
			text-align: center;
			padding: 40px 0 10px;
			background-color: #f5f5f5;
			border-bottom: 1px dotted #ddd
		}
		.title img {
			display: block;
			width: 96px;
			margin: 0 auto
		}
		.title h2 {
			padding: 20px 0;
			font-size: 18px;
			color: #f00;
			font-weight: normal;
		}
		.title h2 span{
			color: #999
		}
		#bocoyx {
			display: block;
			border-radius: 10px;
			margin: 40px 40px 0;
			padding: 15px 0;
			text-decoration: none;
			background-color: #2084d8;
			color: #fff;
			text-align: center;
			font-size: 21px;
		}
		#doctor {
			display: block;
			border-radius: 10px;
			margin: 40px 40px 0;
			padding: 15px 0;
			text-decoration: none;
			background-color: #53c75a;
			color: #fff;
			text-align: center;
			font-size: 21px;
		}
	</style>
</head>

<body>
<!-- <script src="jquery-1.5.1.min.js"></script>
 -->
<script language="javascript" type="text/javascript">
	function isWeiXin(){
		var ua = window.navigator.userAgent.toLowerCase();
		if(ua.match(/MicroMessenger/i) == 'micromessenger'){
			return true;
		}else{
			return false;
		}
	}

	var u = navigator.userAgent,
			app = navigator.appVersion,
			isAndroid = u.indexOf('Android') > -1 || u.indexOf('Linux') > -1,
			isIOS = !!u.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/); //ios终端

	function downloadUrl(cb){ //互联网影像数据中心
		if (isAndroid) {
			return getDownloadUrl('android',cb)
		}else if(isIOS){
			return getDownloadUrl('ios',cb)
		}else {
			return getDownloadUrl('android',cb)
		}
	}
	window.onload = function(){
		//var search = window.location.search;
		var flag = isWeiXin();
		if(flag){
			var test1 = document.createElement('div');
			var test = document.createElement('div');
			var imgInfo = document.createElement('img');
			imgInfo.src = "prompt.png";
			imgInfo.style.width = "100%";
			test1.appendChild(imgInfo);
			test1.style.cssText = "position:absolute;top:30px;left:0; z-index:3;width:100%";
			test.style.cssText = "width:100%; height:100%; background:#000;opacity:0.6; position:absolute;top:0;left:0; z-index:2;";
			document.body.appendChild(test);
			document.body.appendChild(test1);
		}else{
			var downBtn = document.getElementById('bocoyx');
			downloadUrl(function(r){
				if(r){
					downBtn.innerHTML = '下载';
					downBtn.style.backgroundColor = '';
					downBtn.href = r;
				}else{
					downBtn.href = '###';
					downBtn.innerHTML = '暂无可下载版本';
					downBtn.style.backgroundColor = '#ccc'
				}
			});
		}
	}
</script>
<div id="test1"></div>
<div id="test"></div>

<div class="title">
	<img src="ICON1.png" />
	<h2><span>欢迎下载</span>互联网影像数据中心<span>客户端</span></h2>
</div>
<a target="_blank" href="###" style="background-color: #ddd" id="bocoyx">正在获取最新版本...</a>

</body>
</html>
